<?php echo $this->render($this->includeDir . '/toolbar.php');?>
<?php 

	$arrParam = $this->arrParam;
	$empty 			= '<em style="color:#ccc">Updating...</em>';
	$configObj = $this->config;
	
	$email 			= $this->Item['email'];
	$configObj 		= new Zendvn_Controller_Config(array('module'=>$arrParam['module'],
														'fileConfig'=>'user.ini'));
	$itemConfig 	= $configObj->getConfig('config');
	$picture_url	= !empty($this->Item['avatar'])?$itemConfig['thumbUrl3'] . '/' . $this->Item['avatar']:'Empty';
	if($picture_url == 'Empty'){
		$picture	= $empty;
	}else if(!file_exists($itemConfig['thumbDir3'] . '/' . $this->Item['avatar'])){
		$picture	= $empty;
	}else{
		$picture	= $this->cmsImage('category_picture', $picture_url);
	}
	
	$firstname 		= $this->Item['first_name']?Zendvn_Filter_Filter::filterContent($this->Item['first_name'],'filter'):$empty;
	 	 	 	 	 	 	 	 	
	$address 		= $this->Item['address']?Zendvn_Filter_Filter::filterContent($this->Item['address'],'filter'):$empty;
	$company 		= $this->Item['company']?Zendvn_Filter_Filter::filterContent($this->Item['company'],'filter'):$empty;
	$city 			= $this->Item['city']?Zendvn_Filter_Filter::filterContent($this->Item['city'],'filter'):$empty;
	$postal_code 	= $this->Item['postal_code']?Zendvn_Filter_Filter::filterContent($this->Item['postal_code'],'filter'):$empty;
	$country 		= $this->Item['country']?Zendvn_Filter_Filter::filterContent($this->Item['country'],'filter'):$empty;
	$phone 			= $this->Item['phone']?Zendvn_Filter_Filter::filterContent($this->Item['phone'],'filter'):$empty;
	$cell_phone 	= $this->Item['cell_phone']?Zendvn_Filter_Filter::filterContent($this->Item['cell_phone'],'filter'):$empty;
	$other_phone 	= $this->Item['other_phone']?Zendvn_Filter_Filter::filterContent($this->Item['other_phone'],'filter'):$empty;
	$fax 			= $this->Item['fax']?Zendvn_Filter_Filter::filterContent($this->Item['fax'],'filter'):$empty;
	
	$lastname 		= $this->Item['last_name']?Zendvn_Filter_Filter::filterContent($this->Item['last_name'],'filter'):$empty;
	$birthday 		= ($this->Item['birthday'] != '0000-00-00')?Zendvn_Filter_Filter::filterContent($this->Item['birthday'],'filter'):$empty;
	$group_name 	= $this->Item['group_name']?Zendvn_Filter_Filter::filterContent($this->Item['group_name'],'filter'):$empty;
	
	$created_ip		= $this->Item['created_ip']&&$this->Item['created_ip'] != '0.0.0.0'?Zendvn_Filter_Filter::filterContent($this->Item['created_ip'],'filter'):$empty;
	$created		= ($this->Item['created'] != '0000-00-00'&&$this->Item['created'] != '')?Zendvn_Filter_Filter::filterContent($this->Item['created'],'filter'):$empty;
	
	$visited_ip		= $this->Item['visited_ip']?Zendvn_Filter_Filter::filterContent($this->Item['visited_ip'],'filter'):$empty;
	$visited		= $this->Item['visited'] != '0000-00-00 00:00:00'&&$this->Item['visited'] != ''?Zendvn_Filter_Filter::filterContent($this->Item['visited'],'filter'):$empty;
		
	$options 		= array('No','Yes');	
	$group_acp 		= $options[$this->Item['group_acp']];

	$options 		= array('No','Yes');
	
	$group_default 	= $options[$this->Item['group_default']];
	
	$attribs = array('icon'=>'inactive.png','iconDir' => "images/small-icons");
	if($this->Item['status'] == 'active')$attribs['icon'] = 'active.png';
	$status 		= '<img src="'. $attribs['iconDir'] .'/'. $attribs['icon'] .'" />';
	
	$arrRow = array(
					array('label'=>'Email','info'=>$email),
					array('label'=>'Avatar','info'=>$picture),
					array('label'=>'First name','info'=>$firstname),
					array('label'=>'Last name','info'=>$lastname),
					array('label'=>'Birthday','info'=>$birthday),
					array('label'=>'address','info'=>$address),
					array('label'=>'company','info'=>$company),
					array('label'=>'city','info'=>$city),
					array('label'=>'postal_code','info'=>$postal_code),
					array('label'=>'country','info'=>$country),
					array('label'=>'phone','info'=>$phone),
					array('label'=>'cell_phone','info'=>$cell_phone),
					array('label'=>'other_phone','info'=>$other_phone),
					array('label'=>'fax','info'=>$fax),
					array('label'=>'Group','info'=>$group_name),
					array('label'=>'Registed','info'=>$created),
					array('label'=>'Register ip','info'=>$created_ip),
					array('label'=>'Visited','info'=>$visited),
					array('label'=>'Vissted ip','info'=>$visited_ip),
					array('label'=>'Status','info'=>$status),
					);
?>
<div id="element-box">
	<div class="m">
		<div class="form-table">
            	<fieldset class="admin-fieldset">
                <legend class="admin-legend">Form Detail</legend>
            	<table width="100%" border="0">
                	<?php echo $this->partialLoop('row-info.php',$arrRow);?>
                </table>
                <div class="clr"></div>
                </fieldset>
            </div>
            <div class="clr"></div>
	</div>
</div>
